package cn.com.ayqu.module.erp.controller.admin.sale.vo.customer;

import cn.com.ayqu.framework.excel.core.convert.JsonConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.com.ayqu.framework.excel.core.annotations.DictFormat;
import cn.com.ayqu.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - ERP 客户 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ErpCustomerRespVO {

    @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "27520")
    @ExcelIgnore
    private Long id;

    @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @ExcelProperty("客户名称")
    private String name;

    @Schema(description = "手机号码", example = "15601691300")
    @ExcelProperty("手机号码")
    private String mobile;

    @Schema(description = "开启状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelIgnore
    @DictFormat("common_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer status;

    @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
    @ExcelIgnore
    private Integer sort;

    @Schema(description = "车牌号")
    @ExcelIgnore
    private List<String> carNumbers;

    @ExcelProperty(value = "车牌号")
    private String carNumbersStr;

    @Schema(description = "备注", example = "你猜")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "车牌号")
    @ExcelIgnore
    private List<Item> carNumberList;

    @Data
    @ExcelIgnoreUnannotated
    public static class Item {
        private Long carNumberId;

        private String carNumber;
    }
}